From: koos vriezen <koos.vriezen@gmail.com>
Date: Mon, 1 May 2017 18:28:01 +0200
Subject: Compile fix with kernel 4.11
Origin: http://bugs.debian.org/861807
Forwarded: no
Reviewed-By: Eduard Bloch <blade@debian.org>
Last-Update: 2017-05-04

 I use the attached patch to get this module compiled with 4.11. Works
 for me since last sunday.
 Apparently https://aur.archlinux.org/cgit/aur.git/tree/linux411.patch?h=broadcom-wl
 has come with a different patch for the removed last_rx field in
 netdevice. But judging the commit log
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/include/linux/netdevice.h?id=4a7c972644c1151f6dd34ff4b5f7eacb239e22ee
 and the fact that last_rx isn't used elsewhere I came up with just
 ifdef it out.
---
 amd64/src/wl/sys/wl_cfg80211_hybrid.c | 3 +++
 amd64/src/wl/sys/wl_linux.c           | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/amd64/src/wl/sys/wl_cfg80211_hybrid.c b/amd64/src/wl/sys/wl_cfg80211_hybrid.c
index 551fe1f..83930ec 100644
--- a/amd64/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/amd64/src/wl/sys/wl_cfg80211_hybrid.c
@@ -30,6 +30,9 @@
 #include <linux/kthread.h>
 #include <linux/netdevice.h>
 #include <linux/ieee80211.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
 #include <net/cfg80211.h>
 #include <linux/nl80211.h>
 #include <net/rtnetlink.h>
diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c
index b7fbe28..77dc327 100644
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -2912,7 +2912,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
 	if (skb == NULL) return;
 
 	skb->dev = wl->monitor_dev;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
 	skb->dev->last_rx = jiffies;
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
 	skb_reset_mac_header(skb);
 #else
